
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
 
        http://www.apache.org/licenses/LICENSE- 2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
  <HEAD>
    <TITLE>Apache FtpServer - Messages</TITLE>
    <META http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <LINK type="text/css" rel="stylesheet" href="http://mina.apache.org/index.data/style.css">
    <SCRIPT type="text/javascript" language="javascript">
      function init() {
        /* Search form initialization */
        var form = document.forms['googleSearch'];
        if (form != null) {
          form.elements['domains'].value = location.hostname;
          form.elements['sitesearch'].value = location.hostname;
        }

      }
    </SCRIPT>
  </HEAD>
  <BODY onload="init()">
    <DIV id="PageContent" style="padding-bottom: 0px;">
      <DIV class="pageheader" style="padding: 6px 0px 0px 0px;">
        <DIV id="apacheLogo" style="width: 100%; text-align: right; position: absolute; top: 33px;">
          <A href="http://www.apache.org/"><IMG src="http://www.apache.org/images/asf-logo.gif" border="0" alt="The Apache Software Foundation" title="The Apache Software Foundation" hspace="12"></A>
        </DIV>
        <DIV id="minaLogo" style="position: absolute; top: 24px; left: 16px;">
          <A href="http://mina.apache.org/ftpserver"><IMG src="http://mina.apache.org/ftpserver/index.data/logo-300x95.png" border="0" alt="Apache FtpServer" title="Apache FtpServer"></A>
        </DIV>
        <DIV class="greynavbar" style="margin: 156px 0px 0px 0px;">
          <TABLE border="0" cellpadding="2" cellspacing="0" width="100%" style="position: relative; z-index: 10;">
            <TR>
              <TD align="left" valign="middle" align="left" style="padding-left: 17px;" width="100%" nowrap="">
                &nbsp;<A href="index.html" title="Apache MINA FtpServer">Apache MINA FtpServer</A>&nbsp;&gt;&nbsp;<A href="index.html" title="Index">Index</A>&nbsp;&gt;&nbsp;<A href="documentation.html" title="Documentation">Documentation</A>&nbsp;&gt;&nbsp;<A href="" title="Messages">Messages</A>
              </TD>
              <TD align="right" valign="middle" nowrap="">
                <FORM name="googleSearch" action="http://www.google.com/search" method="get" style="margin: 0px; padding: 0px;">
                  <INPUT type="hidden" name="ie" value="UTF-8">
                  <INPUT type="hidden" name="oe" value="UTF-8">
                  <INPUT type="hidden" name="domains" value="">
                  <INPUT type="hidden" name="sitesearch" value="">
                  <INPUT type="text" name="q" maxlength="255" value="">        
                  <INPUT type="submit" name="btnG" value="Google Search">
                </FORM>
              </TD>
              <TD align="right" valign="middle" style="padding-right: 8px;" nowrap="">
                <FORM name="listSearch" action="http://mina.markmail.org/search/" method="get" style="margin: 0px; padding: 0px;">
                  <INPUT type="text" name="q" maxlength="255" value="">        
                  <INPUT type="submit" value="Mailing List Search">
                </FORM>
              </TD>
            </TR> 
          </TABLE>
        </DIV>
      </DIV>
      <DIV id="pageBody" style="clear: both;">
        <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
          <TR>
            <TD width="192" valign="top" nowrap="">
              <DIV style="padding: 0px 8px 16px 20px;">
                
                                                                                                                                                                                                                                          <H3><A name="Navigation-Overview"></A>Overview</H3>

<UL>
	<LI><A href="index.html" title="Index">Home</A></LI>
	<LI><A href="features.html" title="Features">Features</A></LI>
	<LI><A href="documentation.html" title="Documentation">Documentation</A></LI>
	<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
	<LI><A href="source.html" title="Source">Source</A></LI>
	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
	<LI><A href="related-projects.html" title="Related Projects">Related Projects</A></LI>
</UL>


<H3><A name="Navigation-Community"></A>Community</H3>

<UL>
	<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
	<LI><A href="getting-involved.html" title="Getting Involved">Getting Involved</A></LI>
	<LI><A href="reporting-a-bug.html" title="Reporting a Bug">Reporting a Bug</A></LI>
	<LI><A href="contributors.html" title="Contributors">Contributors</A></LI>
	<LI><A href="testimonials.html" title="Testimonials">Testimonials</A></LI>
</UL>


<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>

<UL>
	<LI><A href="http://www.apache.org/foundation/thanks.html" rel="nofollow">Thanks</A></LI>
	<LI><A href="http://www.apache.org/foundation/sponsorship.html" rel="nofollow">Sponsorship</A></LI>
	<LI><A href="http://www.apache.org/foundation/contributing.html" rel="nofollow">Contributing</A></LI>
</UL>
                                                                                                                    </DIV>
             <DIV align="center"><IFRAME src="http://www.apache.org/ads/buttonbar.html" style="border-width:0" frameborder="0" scrolling="no" width="135" height="265"></IFRAME></DIV>
            </TD>
            <TD width="100%" valign="top">
              <DIV class="pagecontent">
                <H1 style="margin-top: 0px;">
                  Messages
                </H1>
                <DIV class="wiki-content">
                  <P>This document explains how to customize all the Apache FtpServer reply messages.</P>

<P>All the server messages are customizable. The default reply messages are bundled with the server. The user defined custom messages will be stored separately. This custom message file is configurable. </P>

<P>The FtpServer project is interested in localized message bundles, please <A href="mailing-lists.html" title="Mailing Lists">contact the project</A> if you would like to donate.</P>

<H3><A name="Messages-Example"></A>Example</H3>
<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">
&lt;messages languages=<SPAN class="code-quote">&quot;se, no ,da&quot;</SPAN> /&gt;
</PRE>
</DIV></DIV>

<H3><A name="Messages-messageselement"></A>messages element</H3>
<TABLE class="confluenceTable"><TBODY>
<TR>
<TH class="confluenceTh"> Attribute </TH>
<TH class="confluenceTh"> Description </TH>
<TH class="confluenceTh"> Required </TH>
<TH class="confluenceTh"> Default value </TH>
</TR>
<TR>
<TD class="confluenceTd"> directory </TD>
<TD class="confluenceTd"> The directory in which message bundles can be located </TD>
<TD class="confluenceTd"> No </TD>
<TD class="confluenceTd">&nbsp;</TD>
</TR>
<TR>
<TD class="confluenceTd"> languages </TD>
<TD class="confluenceTd"> A comma separated list of the languages that the server will provide messages in </TD>
<TD class="confluenceTd"> No </TD>
<TD class="confluenceTd">&nbsp;</TD>
</TR>
</TBODY></TABLE>

<H3><A name="Messages-Creatingacustomizedmessagebundle"></A>Creating a customized message bundle</H3>
<H4><A name="Messages-DynamicValues"></A>Dynamic Values</H4>

<P> Dynamic values can be embedded in the server message replies. User can specify different variables in message strings. Variables are represented by <EM>{variable}</EM> in the string.</P>
<TABLE class="confluenceTable"><TBODY>
<TR>
<TH class="confluenceTh"> Variable Name </TH>
<TH class="confluenceTh"> Description </TH>
</TR>
<TR>
<TD class="confluenceTd"> server.ip </TD>
<TD class="confluenceTd"> Server IP address. </TD>
</TR>
<TR>
<TD class="confluenceTd"> server.port </TD>
<TD class="confluenceTd"> Server port. </TD>
</TR>
<TR>
<TD class="confluenceTd"> client.ip </TD>
<TD class="confluenceTd"> Client IP address. </TD>
</TR>
<TR>
<TD class="confluenceTd"> client.con.time </TD>
<TD class="confluenceTd"> Client connection time. The date format is yyyy-MM-dd'T'HH:mm:ss (ISO8601). </TD>
</TR>
<TR>
<TD class="confluenceTd"> client.login.time </TD>
<TD class="confluenceTd"> Client login time. The date format is yyyy-MM-dd'T'HH:mm:ss (ISO8601). </TD>
</TR>
<TR>
<TD class="confluenceTd"> client.login.name </TD>
<TD class="confluenceTd"> User login name. If the user has not passed the login name, it will be null. </TD>
</TR>
<TR>
<TD class="confluenceTd"> client.access.time </TD>
<TD class="confluenceTd"> Client last access time. The date format is yyyy-MM-ddTHH:mm:ss (ISO8601). </TD>
</TR>
<TR>
<TD class="confluenceTd"> client.home </TD>
<TD class="confluenceTd"> User home directory. </TD>
</TR>
<TR>
<TD class="confluenceTd"> client.dir </TD>
<TD class="confluenceTd"> User current directory. </TD>
</TR>
<TR>
<TD class="confluenceTd"> request.line </TD>
<TD class="confluenceTd"> User request line. </TD>
</TR>
<TR>
<TD class="confluenceTd"> request.cmd </TD>
<TD class="confluenceTd"> User FTP command. </TD>
</TR>
<TR>
<TD class="confluenceTd"> request.arg </TD>
<TD class="confluenceTd"> User request argument. If there is no argument it will be null. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.start.time </TD>
<TD class="confluenceTd"> Server start time. The date format is yyyy-MM-ddTHH:mm:ss (ISO8601). </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.con.total </TD>
<TD class="confluenceTd"> Total number of connections after server startup. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.con.curr </TD>
<TD class="confluenceTd"> Current connection number. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.login.total </TD>
<TD class="confluenceTd"> Total number of logins after server startup. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.login.curr </TD>
<TD class="confluenceTd"> Current login number. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.login.anon.total </TD>
<TD class="confluenceTd"> Total number of anonymous logins after server startup. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.login.anon.curr </TD>
<TD class="confluenceTd"> Current anonymous login number. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.file.upload.count </TD>
<TD class="confluenceTd"> Total number of files uploaded. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.file.upload.bytes </TD>
<TD class="confluenceTd"> Total number of bytes uploaded. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.file.download.count </TD>
<TD class="confluenceTd"> Total number of files downloaded </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.file.download.bytes </TD>
<TD class="confluenceTd"> Total number of bytes downloaded </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.file.delete.count </TD>
<TD class="confluenceTd"> Total number of files deleted. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.dir.create.count </TD>
<TD class="confluenceTd"> Total number of directories created. </TD>
</TR>
<TR>
<TD class="confluenceTd"> stat.dir.delete.count </TD>
<TD class="confluenceTd"> Total number of directories removed. </TD>
</TR>
<TR>
<TD class="confluenceTd"> output.code </TD>
<TD class="confluenceTd"> FTP Server 3 digit reply code. </TD>
</TR>
<TR>
<TD class="confluenceTd"> output.msg </TD>
<TD class="confluenceTd"> Basic core message which has to be available in the message. </TD>
</TR>
</TBODY></TABLE>
                </DIV>
  
              </DIV>
            </TD>
          </TR>
        </TABLE>
        <DIV class="footer" style="text-align: center">
          Copyright &copy; 2004-2008, <A href="http://www.apache.org/">The Apache Software Foundation</A>
        </DIV>
      </DIV>
    </DIV>
  </BODY>
</HTML>
